<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/html_head :: head(~{::title},~{},~{})">
  <title>搜索结果</title>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  <!-- 主 头部 -->
  <header th:insert="common/top :: top"></header>
  <!-- 左侧菜单，包含logo、搜索、菜单-->
  <aside th:insert="common/left :: left"></aside>

  <!-- 页面内容包装器 div -->
  <div class="content-wrapper">
    <div class="container">
      <!-- Content Header (Page header) -->
      <section class="content-header">
        <h1>
          搜索 [ <span th:text="${searchKey}"></span> ] 的结果
          <small>搜索内容</small>
        </h1>
        <ol class="breadcrumb">
          <li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li>
          <li class="active">搜索</li>
        </ol>
      </section>

      <!-- Main content -->
      <section class="content">
        <div class="box box-widget">
          <!-- /.box-header -->
          <div class="box-body" id="tableArea">
            <table class="table table-bordered table-striped table-responsive data-table" style="width:100%">
              <thead>
              <tr>
                <th>表名</th>
                <th>发起人</th>
                <th>发起时间</th>
                <th>截止时间</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody>
              <tr th:if="${#lists.size(tableList) == 0}" style="text-align:center;"><td valign="top" colspan="5" class="dataTables_empty">没有匹配结果</td></tr>
              <tr th:each="table : ${tableList}">
                <td th:text="${table.name}">表名</td>
                <td th:text="${table.ownerName}">发起人</td>
                <td th:text="${#dates.format(table.startTime,'yyyy-MM-dd HH:mm')}">发起时间</td>
                <td th:text="${#dates.format(table.endTime,'yyyy-MM-dd HH:mm')}">截止时间</td>
                <td>
                  <a th:href="'/collect/like/' + ${table.id}">
                    <button type="button" class="btn btn-sm btn-info" th:onclick="'table_like_fun(' + ${table.id} +  ')'">
                      <i class="fa fa-star"></i> 收藏
                    </button>
                  </a>
                  <a th:href="'/collect/share/start?t=' + ${table.id}">
                    <button type="button" class="btn btn-sm btn-primary" th:onclick="'table_edit_fun(' + ${table.id} +  ')'">
                      <i class="fa fa-edit"></i> 填写
                    </button>
                  </a>

                  <a th:href="'/collect/share/' + ${table.id}">
                    <button type="button" class="btn btn-sm btn-warning" th:onclick="'table_share_fun(' + ${table.id} +  ')'">
                      <i class="glyphicon glyphicon-share-alt"></i> 分享
                    </button>
                  </a>
                </td>
              </tr>
              </tbody>
            </table>

          </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
      </section>
      <!-- /.content -->
    </div>
    <!-- /.container -->
  </div>
  <!-- /.content-wrapper -->

  <!-- /.页面内容包装器 div 结束 -->

  <!-- 页脚 -->
  <footer th:insert="common/bottom :: footer"></footer>
  <!-- Control Sidebar 右侧边栏 -->
  <aside th:insert="common/right :: aside"></aside>
  <!-- 右侧边栏的背景，必须紧接着control sidebar放这个  -->
  <div th:insert="common/right :: aside2"></div>
</div>
<!-- ./wrapper -->
<!-- Js 脚本 -->
<div th:insert="common/html_js :: div_js"></div>
<!-- DataTable 脚本 -->
<div th:insert="common/html_js :: data_table_js"></div>
</body>
</html>